//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { Tag, TagResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooTagList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<TagResponse>(`/uctoo/tag/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooTag = async (id: string) => {
  return requestClient.get<Tag>(`/uctoo/tag/${id}`);
};

export const adductooTag = async (data: Partial<Tag>) => {
  return requestClient.post<Tag>('/uctoo/tag/add', data);
};

export const edituctooTag = async (data: Partial<Tag>) => {
  return requestClient.post<Tag>('/uctoo/tag/edit', data);
};

export const deleteuctooTag = async (id: string) => {
  return requestClient.post<any>('/uctoo/tag/del', { id });
};
